﻿using System.Reflection;

namespace Borg
{
    public class ActivityQueueItem
    {
        private readonly MethodInfo _method;
        private readonly object _obj;
        private readonly RepositoryElement[] _parameters;

        public ActivityQueueItem(object obj, MethodInfo method, RepositoryElement[] parameters)
        {
            _obj = obj;
            _method = method;
            _parameters = parameters;
        }

        public void ExecuteItem()
        {
            _method.Invoke(_obj, _parameters);
        }
    }
}

